<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

function cmf_filter_content($content){
    $replace_str = '***';
    if(empty($content)) return $content;
    $site_info = cmf_get_site_info();
    
    if(empty($site_info['site_filter']) || $site_info['site_filter'] != 1)return $content;
    
    $mingan = $site_info['site_mingan'];
    
    if(!empty($mingan)){
        $data = explode('@', $mingan);
    }
    
    if(empty($data))        return $content;
    return str_replace($data, $replace_str,$content);
}